/*
 * @Author: your name
 * @Date: 2022-02-26 13:43:33
 * @LastEditTime: 2022-04-19 13:28:34
 * @LastEditors: Please set LastEditors
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: \trace-source-web\src\api\common-production\index.js
 */
/*
 * @Description: 生产系统相关数据查询
 */
import zhreq from "@/api/axios";
export default {
  /**
   * @description: 获取所有表格列表 *代表必填
   * @param {String/Number} page *
   * @param {String/Number} size *
   */
  gettablelist(params) {
    return zhreq.post("/batch/queryPageList", {
      page: params.page,
      size: params.size,
      entity: {
        "deleteFlag": false,
        "farmingTypeNo": sessionStorage.farmingTypeNo,
        "status": params.status
      }
    });
  },
  /**
   * @description: 生产批次查询条件查询 *代表必填s
   */
  querybylist(params) {
    return zhreq.post("/v3/trace/productionBaseInfo/queryByCondition", {
      ...params
    });
  },
  /**
  * @description: 生产批次品种查询条件查询 *代表必填
  */
  queryriebylist(farmingTypeNo, params) {
    return zhreq.get(`/v3/trace/productionBaseInfo/queryVarietyName?farmingTypeNo=${farmingTypeNo}`, {
      ...params
    });
  },
  // 获取生产溯源
  getTraceabilityList(param) {
    return zhreq.post("/v3/trace/productionBaseInfo/queryPageList", param)
  },
  feignInfo(pictureId) {
    return zhreq.get(`/v3/templateTenant/plantVarietyPicture/queryByPlantVarietyNo?plantVarietyNo=${pictureId}&organizationNo=${sessionStorage.organizationNo}`)
  }
}
